{% extends "layout.html" %}

{% block title %}liste des terminaux fixe{% endblock %}

{% block content %}
<!-- script pour modif odre affichage -->
<script type="text/javascript"> if (window.jQuery == undefined) document.write( unescape('%3Cscript src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"%3E%3C/script%3E') );</script>
<script type="text/javascript" src="js/vendor/jquery.tablesorter.min.js"></script>
<script>
	$(function(){
  $("#myTable").tablesorter();
});
</script>
<!-- Formulaire de recherche -->
<form method="get">
<fieldset>
		<legend>Recherche d'un service ou materiel </legend>
  
	 <div class="input-prepend">
			<input name="search-name" id="search-name" type="text" placeholder="Nom ou code article" value="{{searchName}}"/>
        </div>
            
	
        <div class="input-prepend">
			<button type="submit" class="btn btn-info" name="action" value="search"><i class="icon-search icon-white"></i> Rechercher</button>
		</div>
</fieldset>
</form>

<!-- Bouton de cr�ation de client -->
<fieldset>
		<legend>Creation rapide</legend>
  
            <a href="ve-terminal-ponctuel-creation" class="btn btn btn-primary"><i class="icon-plus-sign icon-white"></i> Ajouter un service ou materiel</a>
  			

</fieldset>			

<!-- Tableau listant les clients -->
<fieldset>
		<legend>Liste d'un service ou materiel</legend>
		<table class="table table-striped tablesorter" id="myTable" >
		  <thead>
			<tr>
              <th>Code article</th>
			  <th>libellé</th>
			  <th>Prix d'achat</th>
			  <th>Prix </th>
			  
			</tr>
		  </thead>
		  <tbody>
			{% for offre in offres %}
			<tr>
				<td>{{offre.code_article}}</td>
				<td>{{offre.libelle}} </td>
				<td>{{offre.prix_ha|number_format(2, '.', ' ')}} €</td>
				<td>{{offre.prix_0|number_format(2, '.', ' ')}} €</td>
				
                <td>
					<div class="btn-group">
					  <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
						Actions
						<span class="caret"></span>
					  </a>
					  <ul class="dropdown-menu">
							<li><a href="ve-terminal-ponctuel-modification?id={{offre.id}}"><i class="icon-edit"></i> Modification</a></li>
							
							<li><a href="ve-terminal-ponctuel?action=delete&id={{offre.id}}"><i class="icon-trash"></i> Suppression</a></li>
							
					</ul>
					</div>
				</td>
			</tr>
			{% endfor %}
		  </tbody>
		</table>
</fieldset>
    
{% endblock %}
	
